package syntaxTree.stm;

import syntaxTree.exp.*;
public class stmPrint extends stm{     // -> System.out.println(Exp)
	exp e;
	public stmPrint(exp e)
	{
		this.preS = new stmInit();
		this.e = e;
	}
	public stmPrint(stm s1,exp e)
	{
		this.preS = s1;
		this.e = e;
	}
	public String toString()
	{
		return (preS.toString()+"\nSystem.out.println("+e.toString()+")"+";\n");
	}
	public String toC()
	{
		return (preS.toC()+"\nprintf(\"%d\","+e.toC()+");\n");
	}
}
